﻿Imports BUS
Imports DTO
Public Class HoSoHocSinh

    Private Sub btnthem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnthem.Click
        Try
            Dim _HSdto As New CHocSinhDTO()
            Dim _Bus As New CHocSinhBus()
            _HSdto.HoTen = txthoten.Text
            _HSdto.NgaySinh = dtingaysinh.Value
            _HSdto.Email = txtemail.Text
            _HSdto.GioiTinh = cbbgioitinh.SelectedItem.ToString()
            _HSdto.DiaChi = txtdiachi.Text
            If _Bus.ThemHocSinh(_HSdto) > 0 Then
                MessageBox.Show("Them Hoc Sinh Thanh Cong")
            Else
                MessageBox.Show("Them Hoc Sinh That Bai")
            End If
        Catch ex As Exception
            MessageBox.Show("Loi --> " + ex.ToString())
        End Try

    End Sub

    Private Sub btnthoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnthoat.Click
        Me.Close()
    End Sub
End Class